<template>
	<DetailPage v-bind="detailConfig" :model="nowData"></DetailPage>
</template>

<script setup lang="ts">
import DetailPage from '@/views/aplid/DetailPage/index.vue'
import { detailConfig } from '@/views/datacenter/basicData/practitioner/config'
import { getAreaObj } from '@/utils/util'

const nowRowData: any = inject('nowRowData')
const nowData: any = ref({})
const getInitData = () => {
  const data = nowRowData.value.dpFoundationPractitionersFile||{}
		const crAreas: any = getAreaObj(data, 'cr', 'get')
		const areas: any = getAreaObj(data, '', 'get')
		const unitAddress: any = getAreaObj(data, 'unit', 'set')

		nowData.value = {
			...data,
			crAreasName: crAreas.names,
			areasName: areas.names,
			unitAddress: unitAddress.names,
		}
}

onMounted(() => {
	getInitData()
})
</script>

<style scoped>
.detail-label {
	color: #eee;
}

.image {
	width: 90%;
	height: 220px;
	display: block;
}
</style>
